package com.gitee.freakchicken.dbapi.conf;

import com.gitee.freakchicken.dbapi.basic.servlet.C_l2WstbTv;
import com.gitee.freakchicken.dbapi.basic.servlet.C_2w4u2UBW;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class C_hvOWfPuY {

    @Value("${dbapi.api.context}")
    private String gf_CGxDbhLn;

    @Autowired
    private C_l2WstbTv gf_Vg5xrtAZ;

    @Autowired
    private C_2w4u2UBW gf_KoU2ZkXk;

    @Bean
    public ServletRegistrationBean m_KRBU1J2M() {
        String lf_ttCytInY = String.format("/%s/*", gf_CGxDbhLn);
        ServletRegistrationBean lf_zLU3npjD = new ServletRegistrationBean(gf_Vg5xrtAZ);
        lf_zLU3npjD.addUrlMappings(lf_ttCytInY);
        log.info("regist APIServlet servelet for {} urlMappings", lf_ttCytInY);
        return lf_zLU3npjD;
    }

    @Bean
    public ServletRegistrationBean m_Tdg4CwD2() {
        ServletRegistrationBean lf_Y3RoWxb5 = new ServletRegistrationBean(gf_KoU2ZkXk);
        lf_Y3RoWxb5.addUrlMappings("/token/generate");
        log.info("regist tokenServlet servelet ");
        return lf_Y3RoWxb5;
    }
}
